package com.airycode.distribution.distribution1.service;

import com.airycode.distribution.distribution1.domain.CompanyEntity;
import com.airycode.distribution.distribution1.repository.CompanyRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zkr-fanxirui on 2017/8/19.
 */
@Service
public class CompanyService {
    final Logger log = LoggerFactory.getLogger(MemberService.class);

    @Autowired
    private CompanyRepository companyRepository;
    //列表页面
    public Map<String,Object> getCompanys(){
        Map<String,Object> data = new HashMap<String,Object>();
        List<CompanyEntity> resultList = companyRepository.findAll();

        data.put("resultList",resultList);
        return data;
    }

}
